package com.hqyj.controller;

import com.hqyj.pojo.Bill;
import com.hqyj.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("bill")
public class BillController {
    @Autowired
    BillService billService;

    //加载表格数据
    @RequestMapping("/billList")
    public  HashMap<String,Object> listPage(Bill b){
        return billService.select(b);
    }
    //修改
    @RequestMapping("/update")
    public HashMap<String,Object>  update(Bill b){
        return billService.update(b);
    }
    //新增
    @RequestMapping("/add")
    public HashMap<String,Object> add(Bill b){
        return billService.add(b);
    }

    //删除
    @RequestMapping("/del")
    public HashMap<String,Object> del(Integer id){
        return billService.del(id);
    }

}
